//thread will stop when main finish
//if mark thread.setDaemon(true); main will not stop

public class Main{
	public static void main(String[] args){

		Thread thread=new Thread(
			new Runnable(){
				public void run(){
					while(true){
						System.out.print("T");
					}
				}
			}
		);
		
		thread.setDaemon(true);//if mark this will not stop send "T"
		thread.start();
	}

}